package hero.mps.web.school_course.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import hero.mps.web.school_course.entity.CourseParam;
import hero.mps.web.school_course.entity.SchoolCourse;
import hero.mps.web.school_course.mapper.SchoolCourseMapper;
import hero.mps.web.school_course.service.SchoolCourseService;
import org.springframework.stereotype.Service;

@Service
public class SchoolCourseServiceImpl extends ServiceImpl<SchoolCourseMapper, SchoolCourse> implements SchoolCourseService {

    @Override
    public IPage<SchoolCourse> getCoursePage(CourseParam courseParam) {
        IPage<SchoolCourse> page = new Page<>(courseParam.getCurrentPage(), courseParam.getPageSize());
        return this.baseMapper.getCoursePage(page, courseParam);
    }
}
